export const loginRouter={
    path: '/login',
    component: () => import('@/views/Login.vue'),
    name: 'login',
    hidden: true
};

export const homeRouter={
    path: '/',
    component: () => import('@/views/Home.vue'),
    hidden:true,
    children:[
        { path: '/home', component: () => import('@/views/Main.vue'), name: '' ,hidden: true}
    ]
};
//动态加载的路由
export const appRouter = [
    {
        path: '/',
        component: () => import('@/views/Home.vue'),
        name: '设备运维',
        iconCls: 'el-icon-menu',
        children: [
            { path: '/main', component: () => import('@/views/Main.vue'), name: '', hidden: true },
            { path: '/om/server', component: () => import('@/views/om/server.vue'), name: '服务器' },
            { path: '/om/device', component: () => import('@/views/om/device.vue'), name: '相机' },
            { path: '/om/session', component: () => import('@/views/om/session.vue'), name: '会话' }
        ]
    },
    {
        path: '/',
        component: () => import('@/views/Home.vue'),
        name: '用户',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/um/user', component: () => import('@/views/um/user.vue'), name: '用户管理'},
            { path: '/um/msg', component: () => import('@/views/um/msg.vue'), name: '短信记录' }
        ]
    },
    {
        path: '/',
        component: () => import('@/views/Home.vue'),
        name: '系统配置',
        iconCls: 'el-icon-setting',
        children: [
            { path: '/sm/cmsV', component: () => import('@/views/sm/cms_v.vue'), name: 'CMS版本管理' },
            { path: '/sm/sysLog', component: () => import('@/views/sm/sys_log.vue'), name: '系统日志' },
            { path: '/sm/role', component: () => import('@/views/sm/role.vue'), name: '角色管理' },
            { path: '/sm/permission', component: () => import('@/views/sm/permission.vue'), name: '菜单管理' }
        ]
    }
];

// 所有上面定义的路由都要写在下面的routers里
export const routers = [
    loginRouter,
    homeRouter,
    ...appRouter
];
